public class Computer {
    public void puton(){
        System.out.println("开机");
    }

    public void putoff(){
        System.out.println("关机");
    }
    public void useDevice(IUSB usb){
        usb.openDevice();
        if (usb instanceof Mouse){
            ((Mouse)usb).click();
        }
        if (usb instanceof KeyBoard){
            ((KeyBoard)usb).input();
        }
        usb.offDevice();
    }
}
